from abc import ABC, abstractmethod

# from process.Copy import Copy

class FSM(ABC):
    cy: any = None

    def __init__(self):
        self.index = 0
        self._times = 0
        self._pin = False

    @abstractmethod
    def condition(self) -> bool:
        """Abstract method to be implemented by subclasses"""
        pass

    @abstractmethod
    def start(self):
        """Abstract method to be implemented by subclasses"""
        pass

    @abstractmethod
    def ing(self):
        """Abstract method to be implemented by subclasses"""
        pass

    @abstractmethod
    def end(self):
        """Abstract method to be implemented by subclasses"""
        pass

    @property
    def times(self) -> int:
        return self._times

    @times.setter
    def times(self, value: int):
        self._times = value

    @property
    def pin(self) -> bool:
        return self._pin

    @pin.setter
    def pin(self, value: bool):
        self._pin = value
